#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <map>
#include <cmath>
using namespace std;


vector<int> SplitDigit(int n)
{
	vector<int> res;
	while(n >0)
	{
		res.push_back(n % 10);
		n /= 10;
	}
	return res;
}
int main3673()
{

	int A,B;
	cin >> A >> B;

	vector<int> digitA = SplitDigit(A);
	vector<int> digitB = SplitDigit(B);


	int product = 0;
	for (int i = 0;i<digitA.size();i++)
	{
		for (int j = 0;j<digitB.size();j++)
		{
			product += digitA[i] * digitB[j];
		}
	}
	cout << product << endl;
	return 0;
}